var pos = [
    [-505, -445],
    [-357, -205],
    [-505, -95],
    [745, -445],
    [545, -205],
    [755, -95]
];
var posDesc = ["左上方", "左边", "左下方", "右上方", "右边", "右下方"];
var mobs27F = [2600106, 9800145];

function act() {
    var e = randomNum(0, pos.length - 1);
    var d = mobs27F[randomNum(0, 1)];
    var c = randomNum(3, 10);
    for (var a = 0; a < c; a++) {
        var b = em.getMonster(d);
        cm.getMap().spawnMonsterOnGroundBelow(b, new java.awt.Point(pos[e][0] + randomNum(-200, 200), pos[e][1]))
    }
    cm.getWeatherEffectNotice(posDesc[e] + " 的那些家伙出现了！在它们消失之前赶紧消灭掉！", 147, 60000, 1)
}

function randomNum(b, a) {
    switch (arguments.length) {
        case 1:
            return parseInt(Math.random() * b + 1, 10);
            break;
        case 2:
            return parseInt(Math.random() * (a - b + 1) + b, 10);
            break;
        default:
            return 0;
            break
    }
};